package com.skt.exception;

import lombok.Getter;

@Getter
public enum UserErrorCode implements ErrorCode {

    // ========== 用户信息相关 (11xxx) ==========
    USER_NOT_FOUND(11001, "用户信息不存在"),
    USER_UPDATE_FAILED(11002, "用户信息更新失败"),
    USER_PROFILE_UPDATE_CONFLICT(11003, "用户资料更新冲突，请稍后重试"),
    
    // ========== 个人资料更新相关 (111xx) ==========
    USERNAME_ALREADY_EXISTS(11101, "用户名已被使用"),
    EMAIL_ALREADY_EXISTS(11102, "邮箱已被绑定"),
    PHONE_ALREADY_EXISTS(11103, "手机号已被使用"),
    REAL_NAME_TOO_LONG(11104, "真实姓名过长"),
    USERNAME_TOO_SHORT(11105, "用户名过短"),
    USERNAME_FORMAT_INVALID(11106, "用户名格式无效"),
    
    // ========== 密码修改相关 (112xx) ==========
    PASSWORD_CHANGE_FAILED(11201, "密码修改失败"),
    OLD_PASSWORD_INCORRECT(11202, "旧密码不正确"),
    NEW_PASSWORD_SAME_AS_OLD(11203, "新密码不能与旧密码相同"),
    PASSWORD_CONFIRM_MISMATCH(11204, "新密码与确认密码不一致"),
    PASSWORD_STRENGTH_WEAK(11205, "密码强度不足"),
    PASSWORD_CHANGE_FREQUENT(11206, "密码修改过于频繁"),
    
    // ========== 用户状态相关 (113xx) ==========
    USER_ACCOUNT_DISABLED(11301, "用户账户已被禁用"),
    USER_ACCOUNT_LOCKED(11302, "用户账户已被锁定"),
    USER_STATUS_INVALID(11303, "用户状态异常"),
    
    // ========== 操作限制相关 (114xx) ==========
    USER_OPERATION_CONFLICT(11401, "用户操作冲突，请稍后重试"),
    USER_PROFILE_UPDATE_LIMIT(11402, "个人资料修改次数超限"),
    PASSWORD_CHANGE_LIMIT(11403, "密码修改次数超限"),
    
    // ========== 数据验证相关 (115xx) ==========
    USER_DATA_VALIDATION_FAILED(11501, "用户数据验证失败"),
    USER_PROFILE_INCOMPLETE(11502, "个人资料不完整");

    private final int code;
    private final String message;

    UserErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}